import { DynamicModule } from '@nestjs/common';
import { TypeOrmModule } from '@nestjs/typeorm';
import { BullModule } from '@nestjs/bull';

// MQ连接
export const QueueConnector: DynamicModule = BullModule.forRoot({
  // redis: {
  //   host: process.env.REDIS_HOST || 'localhost',
  //   port: parseInt(process.env.REDIS_PORT) || 6379,
  //   password: process.env.REDIS_PASSWORD || '',
  // },
  /*  defaultJobOptions: {
      removeOnComplete: true,
      removeOnFail: true, // 如果你也想在作业失败时删除它
    },*/
});
